package com.example.warehouse.sys.pojo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("sys_user")
public class SysUser implements Serializable {
    /*
     * 数据ID
     */
    @ExcelProperty(value = "ID",index = 0)
    @TableId(type = IdType.AUTO)
    private Long id;

    /*
     * 用户名-登录账号
     */
    @ExcelProperty(value = "用户名",index = 1)
    private String name;

    /*
     * 密码(密文)
     */
    @ExcelProperty(value = "密码",index = 2)
    private String password;

    /*
     * 昵称
     */
    @ExcelProperty(value = "昵称",index = 3)
    private String nickname;

    /*
     * 用户地址
     */
    @ExcelProperty(value = "用户地址",index = 4)
    private String address;

    /*
     * 用户头像URL
     */
    @ExcelProperty(value = "用户头像URL",index = 5)
    private String avatar;

    /*
     * 手机号码
     */
    @ExcelProperty(value = "手机号码",index = 6)
    private String phone;

    /*
     * 邮箱
     */
    @ExcelProperty(value = "邮箱",index = 7)
    private String email;

    /*
     * 性别
     */
    @ExcelProperty(value = "性别",index = 8)
    private Integer sex;

    /*
     * 部门ID
     */
    @ExcelProperty(value = "部门ID",index = 9)
    private Long deptId;

    /*
     * 上级领导ID
     */
    @ExcelProperty(value = "上级领导ID",index = 10)
    private Long managementId;

    /*
     * 是否可用，0不可用，1可用
     */
    @ExcelProperty(value = "是否可用",index = 11)
    private Integer enable;

    /*
     * 排序码
     */
    @ExcelProperty(value = "排序码",index = 12)
    private Integer sort;

    /*
     * 描述(用户备注)
     */
    @ExcelProperty(value = "描述",index = 13)
    private String description;

    /*
     * 数据创建时间(入职时间)
     */
    @ExcelProperty(value = "数据创建时间",index = 14)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /*
     * 数据最后修改时间
     */

    @ExcelProperty(value = "数据最后修改时间",index = 15)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;
}
